package com.wink.event;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "event")
@XmlAccessorType(XmlAccessType.FIELD)
public class Event {

	@XmlAttribute(name = "id")
	private int id;

	@XmlElement(name = "subject")
	private String subject;

	@XmlElement(name = "description")
	private String description;

	@XmlElement(name = "owner")
	private String owner;

	@XmlElement(name = "created")
	private Date created;

	@XmlAttribute(name = "space")
	private String space;

	public String getSpace() {
		return space;
	}

	public void setSpace(String space) {
		this.space = space;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}
	
	public String toString() {
		StringBuffer sf = new StringBuffer();
		
		sf.append("<id> " + id);
		sf.append("<subject> " + subject);
		sf.append("<description> " + description);
						
		return sf.toString();
	}
}
